﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="BookingJobList.aspx.cs" Inherits="JobManage_BookingJobList" Title="已办Job列表" culture="auto" meta:resourcekey="PageResource3" uiculture="auto" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<script type="text/javascript">
         var last = null;//最后访问的RadioButton的ID
         function judge(obj)
        {
             if(last == null)
            {
                 last = obj.id;
            //      alert(last);
             }
             else
            {
                 var lo = document.getElementById(last);
                 lo.checked = "";
          //        alert(last + "   " + lo.checked);
                 last = obj.name;
             }
             obj.checked = "checked";
         }
         
           var last2 = null;//最后访问的RadioButton的ID
         function judge2(obj)
        {
             if(last2 == null)
            {
                 last2 = obj.id;
            //      alert(last);
             }
             else
            {
                 var lo = document.getElementById(last2);
                 lo.checked = "";
          //        alert(last + "   " + lo.checked);
                 last2 = obj.name;
             }
             obj.checked = "checked";
         }
         
          function   selectAll2(obj)   
          {   
                  var   theTable =obj.parentElement.parentElement.parentElement;   
                  var   i;   
                  var   j   =   obj.parentElement.cellIndex;   
                    
                  for(i=0;i<theTable.rows.length;i++)   
                  {   
                          var   objCheckBox   =   theTable.rows[i].cells[j].firstChild;   
                          if(objCheckBox.checked!=null)objCheckBox.checked   =   obj.checked;   
                  }   
          }   
          
            function   selectAll(obj)   
          {   
                  var   theTable     =   obj.parentElement.parentElement.parentElement;   
                  var   i;   
                  var   j   =   obj.parentElement.cellIndex;   
                    
                  for(i=0;i<theTable.rows.length;i++)   
                  {   
                          var   objCheckBox   =   theTable.rows[i].cells[j].firstChild;   
                          if(objCheckBox.checked!=null)objCheckBox.checked   =   obj.checked;   
                  }   
          }   
         
    </script>

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="title">
                <asp:Label ID="lblTitle" runat="server" Text="已办Job信息列表" 
                    meta:resourcekey="lblTitleResource1"></asp:Label></div>
            <table class="add_table" cellspacing="1" cellpadding="3">
                <tr style="height: 50px">
                    <td align="right">
                        <asp:Label ID="lblShipperName" runat="server" Text="托运人：" meta:resourcekey="lblShipperNameResource1"></asp:Label>
                    </td>
                    <td>
                        <table width="100%">
                            <tr>
                                <td rowspan="6" align="center">
                                    <asp:ListBox ID="lstShipper" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstShipperResource1" />
                                    <cc1:ListSearchExtender ID="ListSearchExtender2" runat="server" TargetControlID="lstShipper"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                                <td style="height: 2px">
                                </td>
                                <td rowspan="6" align="left">
                                    <asp:ListBox ID="lstSelShipper" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstSelShipperResource1">
                                    </asp:ListBox>
                                    <cc1:ListSearchExtender ID="ListSearchExtender4" runat="server" TargetControlID="lstSelShipper"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnAdd" runat="server" CssClass="btn" Text="添加" 
                                        onclick="btnAdd_Click" meta:resourcekey="btnAddResource1" />
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnDelete" runat="server" CssClass="btn" Text="刪除" 
                                        onclick="btnDelete_Click" meta:resourcekey="btnDeleteResource1" />
                                    <br />
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td align="right">
                        <asp:Label ID="lblVendorName" runat="server" Text="工厂：" meta:resourcekey="lblVendorNameResource1"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlVendor" runat="server" meta:resourcekey="ddlVendorResource1">
                        </asp:DropDownList>
                        <cc1:ListSearchExtender ID="ListSearchExtender1" runat="server" TargetControlID="ddlVendor"
                            PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                        </cc1:ListSearchExtender>
                    </td>
                </tr>
                <tr style="height: 50px">
                    <td align="right">
                        <asp:Label ID="lblWhouse" runat="server" Text="仓库：" meta:resourcekey="lblWhouseResource1"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlWhouse" runat="server" meta:resourcekey="ddlWhouseResource1">
                        </asp:DropDownList>
                        <cc1:ListSearchExtender ID="ListSearchExtender3" runat="server" TargetControlID="ddlWhouse"
                            PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                        </cc1:ListSearchExtender>
                    </td>
                    <td align="right">
                        <asp:Label ID="lblJobDate" runat="server" Text="收货日期：" 
                            meta:resourcekey="lblJobDateResource1"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtDateFrom" runat="server" Width="100px" 
                            onkeydown="return pdDate(this,event);" meta:resourcekey="txtDateFromResource1"></asp:TextBox>-
                        <asp:TextBox ID="txtDateTo" runat="server" Width="100px" 
                            onkeydown="return pdDate(this,event);" meta:resourcekey="txtDateToResource1"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblSONO" runat="server" Text="落货纸号：" 
                            meta:resourcekey="lblSONOResource1"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtSONO" runat="server" meta:resourcekey="txtSONOResource1"></asp:TextBox>
                    </td>
                    <td colspan="2" align="center">
                        <asp:Button ID="btnSearch" runat="server" CssClass="btn" Text="搜索" OnClick="btnSearch_Click"
                            meta:resourcekey="btnSearchResource1" />
                    </td>
                </tr>
            </table>
            <div id="divEntrust" runat="server">
                <div class="list_title">
                    <div class="autoleft">
                        <asp:Label ID="lblSelectOut" runat="server" Text="检索出" 
                            meta:resourcekey="lblSelectOutResource1"></asp:Label>
                        <asp:Label ID="lblTotal"
                            runat="server" meta:resourcekey="lblTotalResource1"></asp:Label>
                        <asp:Label ID="lblSelectOut2" runat="server" Text="条记录" 
                            meta:resourcekey="lblSelectOut2Resource1"></asp:Label>
                              &nbsp;
                        <asp:Label ID="lblTruckSize" runat="server" Text="Truck Size:" 
                            meta:resourcekey="lblTruckSizeResource1"></asp:Label>
                        <asp:DropDownList ID="ddlTruckSize" runat="server" 
                            meta:resourcekey="ddlTruckSizeResource1"  Width="80px">
                        </asp:DropDownList>
                        &nbsp;
                        <asp:Label ID="lblLicenseNO" runat="server" Text="車牌號：" 
                            meta:resourcekey="lblLicenseNOResource1"></asp:Label>
                        <asp:DropDownList ID="ddlLicenseNO" runat="server" 
                            meta:resourcekey="ddlLicenseNOResource1" Width="80px"></asp:DropDownList>
                        &nbsp;
                        <asp:Label ID="lblAppointmentNO" runat="server" Text="預約號：" 
                            meta:resourcekey="lblAppointmentNOResource1"></asp:Label><asp:TextBox
                            ID="txtAppointmentNO" runat="server" 
                            meta:resourcekey="txtAppointmentNOResource1" Width="100px"></asp:TextBox>
                        &nbsp;<asp:Button ID="btnSave" runat="server" Text="保存" CssClass="btn" 
                            OnClick="btnSave_Click" meta:resourcekey="btnSaveResource1" />&nbsp;
                        <asp:Label ID="lblTotalVol" runat="server" Text="Total Vol：" 
                            meta:resourcekey="lblTotalVolResource1"></asp:Label>
                        <asp:Label ID="txtTotalVol" runat="server" 
                            meta:resourcekey="txtTotalVolResource1"></asp:Label>&nbsp;&nbsp;
                        <asp:Label ID="lblTotalWeight" runat="server" Text="Total Weight：" 
                            meta:resourcekey="lblTotalWeightResource1"></asp:Label>
                        <asp:Label ID="txtTotalWeight" runat="server" 
                            meta:resourcekey="txtTotalWeightResource1"></asp:Label>
                            
                            </div>
                    <div class="autoright">
                        <asp:Label ID="lblPerPage" runat="server" Text="每页显示：" 
                            meta:resourcekey="lblPerPageResource1"></asp:Label>
                        <asp:DropDownList ID="ddlPages" runat="server" AutoPostBack="True" 
                            OnSelectedIndexChanged="ddlPages_SelectedIndexChanged" 
                            meta:resourcekey="ddlPagesResource1">
                            <asp:ListItem Selected="True" Text="50" Value="50" 
                                meta:resourcekey="ListItemResource11"></asp:ListItem>
                            <asp:ListItem Text="60" Value="60" meta:resourcekey="ListItemResource12"></asp:ListItem>
                              <asp:ListItem Text="100" Value="100" meta:resourcekey="ListItemResource13"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
                <asp:GridView ID="gvJobList" runat="server" AllowPaging="True"
                    AutoGenerateColumns="False" Width="100%" AllowSorting="True" 
                    onpageindexchanging="gvJobList_PageIndexChanging" 
                    onrowcommand="gvJobList_RowCommand" onsorting="gvJobList_Sorting" 
                    onrowdatabound="gvJobList_RowDataBound" meta:resourcekey="gvJobListResource1" OnDataBinding="gvJobList_DataBinding"
                   CssClass="tblGridView" PageSize="50" >
                    <PagerTemplate>
                        <table style="width: 100%">
                            <tr>
                                <td>
                                    <asp:Label ID="lblPerPage" runat="server" Text="页次" 
                                        meta:resourcekey="lblPerPageResource2"></asp:Label>:&nbsp;<asp:Label
                                        ID="Label1" runat="server" 
                                        Text='<%# ((GridView)Container.Parent.Parent).PageIndex+1 %>' 
                                        meta:resourcekey="Label1Resource1"></asp:Label>/<asp:Label
                                            ID="Label2" runat="server" 
                                        Text='<%# ((GridView)Container.Parent.Parent).PageCount %>' 
                                        meta:resourcekey="Label2Resource1"></asp:Label><asp:Label
                                                ID="lblPage" runat="server" Text="页" 
                                        meta:resourcekey="lblPageResource1"></asp:Label>&nbsp;
                                    <asp:Label ID="lblTotalPages" runat="server" Text="总计" 
                                        meta:resourcekey="lblTotalPagesResource1"></asp:Label>:&nbsp;<asp:Label
                                        ID="Label3" runat="server" 
                                        Text="<%# ((System.Data.DataView)gvJobList.DataSource).Count %>" 
                                        meta:resourcekey="Label3Resource1"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Page" CommandArgument="First"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" 
                                        Text="首页" meta:resourcekey="LinkButton1Resource1"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="Prev" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" 
                                        Text="前页" meta:resourcekey="LinkButton2Resource1"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Page" CommandArgument="Next"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>"
                                        Text="后页" meta:resourcekey="LinkButton3Resource1"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="Last" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>"
                                        Text="尾页" meta:resourcekey="LinkButton4Resource1"></asp:LinkButton>&nbsp;
                                    <asp:Label ID="lblTurnOn" runat="server" Text="转第" 
                                        meta:resourcekey="lblTurnOnResource1"></asp:Label>
                                    <asp:TextBox ID="txtPages"
                                        runat="server" Width="35px" meta:resourcekey="txtPagesResource1"></asp:TextBox>
                                    <asp:Label ID="lblPages2" runat="server" Text="页" 
                                        meta:resourcekey="lblPages2Resource1"></asp:Label>
                                    <asp:LinkButton ID="lbtnGo" runat="server" Text="提交" OnClick="lbtnGo_Click" 
                                        meta:resourcekey="lbtnGoResource1"></asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </PagerTemplate>
                    <Columns>
                    
                      <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" Checked="True" 
                                    oncheckedchanged="CheckBox1_CheckedChanged" AutoPostBack="True" 
                                    meta:resourcekey="CheckBox1Resource1" />
                                <asp:HiddenField ID="hidID" runat="server" Value='<%# Eval("PKID") %>' />
                            </ItemTemplate>
                            <HeaderTemplate>
                                <asp:CheckBox ID="chkAll" runat="server" onclick="selectAll(this);" 
                                    oncheckedchanged="chkAll_CheckedChanged" AutoPostBack="True" 
                                    meta:resourcekey="chkAllResource1" />
                            </HeaderTemplate>
                        </asp:TemplateField>
                        
                     <asp:TemplateField HeaderText="操作" meta:resourcekey="TemplateFieldResource9">
                            <ItemTemplate>
                            <asp:HiddenField ID="hidOrderID" runat="server" Value='<%# Eval("PKID") %>' />                               
                                <asp:LinkButton ID="lbtnCal" runat="server" Text="取消Job" CommandArgument='<%# Eval("PKID") %>'
                                    
                                    OnClientClick='<%# "javascript:return confirm(\""+   Resources.Messages.ConfirmCancelJob  +"\")" %>' CommandName="Cal" 
                                    meta:resourcekey="lbtnCalResource1"></asp:LinkButton>&nbsp;
                                      <asp:LinkButton ID="lbtnCancelexpedite" runat="server" Text="取消派车" CommandArgument='<%# Eval("PKID") %>'
                                    
                                    OnClientClick='<%# "javascript:return confirm(\""+   Resources.Messages.ConfirmCancelExpTruck  +"\")" %>' CommandName="CancelExp" 
                                    meta:resourcekey="lbtnCancelexpediteResource1"></asp:LinkButton>&nbsp;
                                   <a href='PendingJobDetail.aspx?OrderID=<%# Eval("PKID") %>'><asp:Label ID="lblExpedite" runat="server" Text="派车"  meta:resourcekey="lblExpediteResource1" ></asp:Label></a>
                                <a href='../Reports/TemporaryReceipt.aspx?OrderID=<%# Eval("PKID") %>&amp;Status=<%# Eval("Status") %>'>
                                <asp:Label ID="lblPrint" runat="server" Text="打印暂收证明" 
                                    meta:resourcekey="lblPrintResource1"></asp:Label></a>
                            </ItemTemplate>                         
                        </asp:TemplateField>
                    
                        <asp:TemplateField HeaderText="序号" meta:resourcekey="TemplateFieldResource1">
                            <ItemTemplate>
                                <asp:Label ID="lblNo" runat="server" Text='<%# (Container as GridViewRow).RowIndex + 1 %>'
                                    meta:resourcekey="lblNoResource2"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="预约号" SortExpression="Appointament" 
                            meta:resourcekey="TemplateFieldResource2">
                            <ItemTemplate>
                                <asp:Label ID="lblBookingNO" runat="server" Text='<%# Eval("Appointament") %>' 
                                    meta:resourcekey="lblBookingNOResource1"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="工厂" SortExpression="VendorID" meta:resourcekey="TemplateFieldResource4">
                            <ItemTemplate>
                                <asp:Label ID="lblVendorID" runat="server" Text='<%# GetClient(Eval("VendorID")) %>'
                                    meta:resourcekey="lblVendorIDResource1"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="WHSE" meta:resourcekey="TemplateFieldResourceWhse">
                            <ItemTemplate>
                                <asp:Label ID="lblWhouse" runat="server" Text='<%# GetClient(Eval("WhouseID")) %>'
                                    meta:resourcekey="lblWhouseResource1s"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="SO_NO" meta:resourcekey="TemplateFieldResourceSONO">
                            <ItemTemplate>
                                <asp:Label ID="lblSONOs" runat="server" Text='<%# Eval("SONO") %>' meta:resourcekey="lblSONOsResource1"></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Width="10%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="VOL" meta:resourcekey="TemplateFieldResourceVOL">
                            <ItemTemplate>
                                <asp:Label ID="lblVOL" runat="server" Text='<%# Eval("VOL") %>' meta:resourcekey="lblVOLResource1"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Weight" meta:resourcekey="TemplateFieldResource16Weight">
                            <ItemTemplate>
                                <asp:Label ID="lblGrossWT" runat="server" Text='<%# Eval("GrossWT") %>' meta:resourcekey="lblGrossWTResource1"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="JobDate" meta:resourcekey="TemplateFieldResourceJobDate">
                            <ItemTemplate>
                                <asp:Label ID="lblJobDate" runat="server" Text='<%# Eval("JobDate", "{0:yyyy-MM-dd HH:mm}") %>'
                                    meta:resourcekey="lblJobDateResource1s"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="車型" meta:resourcekey="TemplateFieldResourceType" >
                            <ItemTemplate>
                                <asp:Label ID="lblTruckType" runat="server" Text='<%# Eval("Model") %>' meta:resourcekey="lblTruckTypeResource1"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>   
                        
                          <asp:TemplateField HeaderText="備註" meta:resourcekey="TemplateFieldResourceRemarks" >
                            <ItemTemplate>
                                <asp:Label ID="lblRemarks" runat="server" Text='<%# Eval("Remark") %>' meta:resourcekey="lblRemarksResource1"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>                    

                    </Columns>
                    <HeaderStyle HorizontalAlign="Center" />
                    <PagerSettings Mode="NumericFirstLast" />
                    <RowStyle HorizontalAlign="Center" />
                </asp:GridView>
            </div>
           
           
            <br />
            <div id="divTruckSize" runat="server" visible="False">
                <div class="title">
                    &nbsp;<asp:Label ID="Label4" runat="server" Text="车辆列表" meta:resourcekey="Label4Resource1"></asp:Label></div>
                <div class="list_title">
                    <div class="autoleft">
                        <asp:Label ID="Label5" runat="server" Text="检索出" meta:resourcekey="lblSelectOutResource1"></asp:Label>
                        <asp:Label ID="lblTotalTruck" runat="server" meta:resourcekey="lblTotalTruckResource1"></asp:Label><asp:Label
                            ID="Label6" runat="server" Text="条记录" meta:resourcekey="lblSelectOut2Resource1"></asp:Label></div>
                    <div class="autoright">
                        <asp:Label ID="Label7" runat="server" Text="每页显示：" meta:resourcekey="lblPerPageResource1"></asp:Label>
                        <asp:DropDownList ID="ddlPagesTruck" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPagesTruck_SelectedIndexChanged"
                            meta:resourcekey="ddlPagesTruckResource1">
                            <asp:ListItem Selected="True" Text="5" Value="5" meta:resourcekey="ListItemResource100"></asp:ListItem>
                            <asp:ListItem Text="10" Value="10" meta:resourcekey="ListItemResource101"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
                <asp:GridView ID="gvTruckList" runat="server" AllowPaging="True" EmptyDataText="没有车辆可选"
                    AutoGenerateColumns="False" Width="100%" CssClass="tblGridView" AllowSorting="True"
                    OnPageIndexChanging="gvTruckList_PageIndexChanging" OnSorting="gvTruckList_Sorting"
                    meta:resourcekey="gvTruckListResource1" OnRowDataBound="gvTruckList_RowDataBound"
                    OnDataBinding="gvTruckList_DataBinding">
                    <PagerTemplate>
                        <table style="width: 100%">
                            <tr>
                                <td>
                                    <asp:Label ID="lblPerPage" runat="server" Text="页次：" meta:resourcekey="lblPerPageResource2"></asp:Label>&nbsp;<asp:Label
                                        ID="Label1" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex+1 %>'
                                        meta:resourcekey="Label1Resource2"></asp:Label>/<asp:Label ID="Label2" runat="server"
                                            Text='<%# ((GridView)Container.Parent.Parent).PageCount %>' meta:resourcekey="Label2Resource2"></asp:Label><asp:Label
                                                ID="lblPage" runat="server" Text="页" meta:resourcekey="lblPageResource1"></asp:Label>&nbsp;
                                    <asp:Label ID="lblTotalPages" runat="server" Text="总计" meta:resourcekey="lblTotalPagesResource1"></asp:Label>&nbsp;<asp:Label
                                        ID="Label3" runat="server" Text="<%# ((System.Data.DataView)gvTruckList.DataSource).Count %>"
                                        meta:resourcekey="Label3Resource2"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Page" CommandArgument="First"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" Text="首页" meta:resourcekey="LinkButton1Resource2"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="Prev" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" Text="前页" meta:resourcekey="LinkButton2Resource2"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Page" CommandArgument="Next"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>"
                                        Text="后页" meta:resourcekey="LinkButton3Resource2"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="Last" CommandName="Page"
                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>"
                                        Text="尾页" meta:resourcekey="LinkButton4Resource2"></asp:LinkButton>&nbsp;
                                    <asp:Label ID="lblTurnOnTruck" runat="server" Text="转第" meta:resourcekey="lblTurnOnTruckResource1"></asp:Label><asp:TextBox
                                        ID="txtPagesTruck" runat="server" Width="35px" meta:resourcekey="txtPagesTruckResource1"></asp:TextBox>
                                    <asp:Label ID="lblPages2Truck" runat="server" Text="页" meta:resourcekey="lblPages2TruckResource1"></asp:Label>
                                    <asp:LinkButton ID="lbtnGoTruck" runat="server" Text="提交" OnClick="lbtnGoTruck_Click"
                                        meta:resourcekey="lbtnGoTruckResource1"></asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </PagerTemplate>
                    <Columns>                       
                        <asp:TemplateField meta:resourcekey="TemplateFieldResource3">
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox2" runat="server" Checked="True" 
                                    meta:resourcekey="CheckBox2Resource1" />
                                <asp:HiddenField ID="hidID" runat="server" Value='<%# Eval("PKID") %>' />
                            </ItemTemplate>
                            <HeaderTemplate>
                                <input id="CheckAll2" type="checkbox" onclick="selectAll2(this);" />
                            </HeaderTemplate>
                            <ItemStyle Width="5%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="序号" meta:resourcekey="TemplateFieldResource1">
                            <ItemTemplate>
                                <asp:Label ID="lblNo" runat="server" Text='<%# (Container as GridViewRow).RowIndex + 1 %>'
                                    meta:resourcekey="lblNoResource2"></asp:Label>
                            </ItemTemplate>
                            <ItemStyle Width="4%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="车型" SortExpression="Type" meta:resourcekey="TemplateFieldResource17">
                            <ItemTemplate>
                            <asp:Label ID="lblTruckSizes" runat="server" Text='<%# Eval("TruckSizeName") %>' 
                                    meta:resourcekey="lblTruckSizesResource1"></asp:Label>
                                <asp:HiddenField ID="hidType" runat="server" Value='<%# Eval("TypeID") %>' />
                                <asp:DropDownList ID="ddlType" runat="server" Enabled="False" Visible="False" 
                                    meta:resourcekey="ddlTypeResource1">
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="车牌号" SortExpression="LicenseNO" meta:resourcekey="TemplateFieldResource15">
                            <ItemTemplate>
                                <asp:Label ID="lblLicenseNO" runat="server" Text='<%# Eval("LicenseNO") %>' meta:resourcekey="lblLicenseNOResource1s"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Driver" SortExpression="Driver" meta:resourcekey="TemplateFieldResource16">
                            <ItemTemplate>
                                <asp:Label ID="lblDriver" runat="server" Text='<%# GetDriver(Eval("Driver")) %>'
                                    meta:resourcekey="lblDriverResource1"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle HorizontalAlign="Center" />
                    <RowStyle HorizontalAlign="Center" />
                </asp:GridView>
            </div>
           
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>


